package com.rocketmq.controller;

import com.rocketmq.constant.RocketMqContant;
import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

/**
 * ConsumerController
 *
 * @author huangjj
 * @date 2022/10/2715:39
 */
@Slf4j
@Component
@RocketMQMessageListener(consumerGroup = "consumer-rocket-a", topic = RocketMqContant.TOPIC_ROCKET_A)
public class ConsumerController implements RocketMQListener<String> {
    @Override
    public void onMessage(String msg) {
        log.info("consumer-rocket-a:::::"+msg);
    }
}
